package org.dromara.wms.domain.bo;

import org.dromara.wms.domain.WmsOrder;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.dromara.wms.domain.vo.WmsOrderLineVo;

import java.util.List;

/**
 * 跟物品有关的订单业务对象 wms_order
 *
 * @author wenrui
 * @date 2024-03-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = WmsOrder.class, reverseConvertGenerate = false)
public class WmsOrderBo extends BaseEntity {

  /**
   * 库单ID
   */
  @NotNull(message = "库单ID不能为空", groups = {EditGroup.class})
  private Long id;

  /**
   * 单据名称
   */
  @NotBlank(message = "单据名称不能为空", groups = {AddGroup.class, EditGroup.class})
  private String name;

  /**
   * 单据类型
   */
  @NotNull(message = "单据类型不能为空", groups = {AddGroup.class, EditGroup.class})
  private Long typeId;

  /**
   * 客户
   */
  @NotNull(message = "客户不能为空", groups = {AddGroup.class, EditGroup.class})
  private Long partnerId;

  /**
   * 己方仓库id
   */
  private Long selfWhId;

  /**
   * 对方仓库id
   */
  private Long otherWhId;

  /**
   * 单据状态
   */
  @NotBlank(message = "单据状态不能为空", groups = {AddGroup.class, EditGroup.class})
  private String status;

  /**
   * 单据来源id
   */
  private Long sourceId;

  /**
   * 生产厂商
   */
  private Long manufacturerId;

  /**
   * 申请人
   */
  private Long applicantId;

  /**
   * 发货员
   */
  private Long execId;

  /**
   * 备注
   */
//  @NotBlank(message = "备注不能为空", groups = {AddGroup.class, EditGroup.class})
  private String remark;

  /**
   * 子表集合
   */
  private List<WmsOrderLineBo> line;

}
